Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-43518: [Python][Packaging][CI] Drop Python 3.8 support #43970

Merged
merged 21 commits into from
Sep 16, 2024

Conversation

raulcd
Copy link
Member

@raulcd raulcd commented Sep 5, 2024

Rationale for this change

Python 3.8 is End of Support on 31st October 2023. We can drop support for pyarrow 18.0.0.
See: https://endoflife.date/python

What changes are included in this PR?

Remove support for 3.8. Update minimum required Python version and update some CI jobs to use the minimum Python supported version

Are these changes tested?

They will be tested via Archery

Are there any user-facing changes?

Yes in terms of not supporting older versions of Python. This will be a breaking change for some users but not for the API itself

@@ -209,7 +209,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: 3.8
python-version: 3.9
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we bump this directly to something like 3.12? As far as I understand, this python version is only used for running archery, so it shouldn't matter much which version we use?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, I had the same thought, I will update accordingly. Another one that I was thinking is whether we want to change the default .env to be bumped too to something like 3.12

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about using the latest Python by 3.x for this? If we can use 3.x for this, we don't need to bump version periodically.

See also: https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#using-the-python-version-input

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we use 3.x, though, the build may fail because of missing dependencies or incompatibilities on the next version bump.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've bumped to 3.12

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting committer review Awaiting committer review labels Sep 5, 2024
@alippai
Copy link
Contributor

alippai commented Sep 5, 2024

Would it make sense to drop most of the pytz support in favor of zoneinfo available starting 3.9?
Arrow could accept pytz for compat, but the dependency could be dropped and the lib could return zoneinfo instead

@raulcd
Copy link
Member Author

raulcd commented Sep 6, 2024

Would it make sense to drop most of the pytz support in favor of zoneinfo available starting 3.9? Arrow could accept pytz for compat, but the dependency could be dropped and the lib could return zoneinfo instead

This can be done on a separate issue as an enhancement

@github-actions github-actions bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Sep 9, 2024
@raulcd
Copy link
Member Author

raulcd commented Sep 9, 2024

@jorisvandenbossche we are still testing with Pandas 1.0 which supports only up to Python 3.8. Should I remove that job from here: https://github.com/apache/arrow/blob/main/.github/workflows/python.yml#L81
or should we bump Pandas to the latest 1.x (1.5) release so we keep testing pandas 1.x?

@raulcd
Copy link
Member Author

raulcd commented Sep 9, 2024

@github-actions crossbow submit -g python

Copy link

github-actions bot commented Sep 9, 2024

Revision: 7f7ed83

Submitted crossbow builds: ursacomputing/crossbow @ actions-b0516a9194

Task Status
example-python-minimal-build-fedora-conda GitHub Actions
example-python-minimal-build-ubuntu-venv GitHub Actions
test-conda-python-3.10 GitHub Actions
test-conda-python-3.10-cython2 GitHub Actions
test-conda-python-3.10-hdfs-2.9.2 GitHub Actions
test-conda-python-3.10-hdfs-3.2.1 GitHub Actions
test-conda-python-3.10-pandas-latest-numpy-latest GitHub Actions
test-conda-python-3.10-substrait GitHub Actions
test-conda-python-3.11 GitHub Actions
test-conda-python-3.11-dask-latest GitHub Actions
test-conda-python-3.11-dask-upstream_devel GitHub Actions
test-conda-python-3.11-hypothesis GitHub Actions
test-conda-python-3.11-pandas-latest-numpy-1.26 GitHub Actions
test-conda-python-3.11-pandas-latest-numpy-latest GitHub Actions
test-conda-python-3.11-pandas-nightly-numpy-nightly GitHub Actions
test-conda-python-3.11-spark-master GitHub Actions
test-conda-python-3.12 GitHub Actions
test-conda-python-3.12-cpython-debug GitHub Actions
test-conda-python-3.12-pandas-upstream_devel-numpy-nightly GitHub Actions
test-conda-python-3.9 GitHub Actions
test-conda-python-3.9-pandas-1.0-numpy-1.19 GitHub Actions
test-conda-python-emscripten GitHub Actions
test-cuda-python GitHub Actions
test-debian-12-python-3-amd64 GitHub Actions
test-debian-12-python-3-i386 GitHub Actions
test-fedora-39-python-3 GitHub Actions
test-ubuntu-20.04-python-3 GitHub Actions
test-ubuntu-22.04-python-3 GitHub Actions

@raulcd
Copy link
Member Author

raulcd commented Sep 9, 2024

@github-actions crossbow submit test-ubuntu-20.04-python-3

Copy link

github-actions bot commented Sep 9, 2024

Revision: 6417ba8

Submitted crossbow builds: ursacomputing/crossbow @ actions-bea836645b

Task Status
test-ubuntu-20.04-python-3 GitHub Actions

@raulcd
Copy link
Member Author

raulcd commented Sep 9, 2024

@github-actions crossbow submit test-conda-python--pandas-

Copy link

github-actions bot commented Sep 9, 2024

Revision: cceb42c

Submitted crossbow builds: ursacomputing/crossbow @ actions-92763bccf5

Task Status
test-conda-python-3.10-pandas-latest-numpy-latest GitHub Actions
test-conda-python-3.11-pandas-latest-numpy-1.26 GitHub Actions
test-conda-python-3.11-pandas-latest-numpy-latest GitHub Actions
test-conda-python-3.11-pandas-nightly-numpy-nightly GitHub Actions
test-conda-python-3.11-pandas-upstream_devel-numpy-nightly GitHub Actions
test-conda-python-3.9-pandas-1.5-numpy-1.24 GitHub Actions

@raulcd
Copy link
Member Author

raulcd commented Sep 9, 2024

@github-actions crossbow submit test-cuda-*

@raulcd
Copy link
Member Author

raulcd commented Sep 9, 2024

@github-actions crossbow -g wheel

Copy link

github-actions bot commented Sep 9, 2024

Revision: e38f0ec

Submitted crossbow builds: ursacomputing/crossbow @ actions-cea603844a

Task Status
test-cuda-cpp GitHub Actions
test-cuda-python GitHub Actions

Copy link

github-actions bot commented Sep 9, 2024

No such option: -g
The Archery job run can be found at: https://github.com/apache/arrow/actions/runs/10775061011

@raulcd
Copy link
Member Author

raulcd commented Sep 9, 2024

@github-actions crossbow submit -g wheel

Copy link

github-actions bot commented Sep 9, 2024

Revision: e38f0ec

Submitted crossbow builds: ursacomputing/crossbow @ actions-5c11026f84

Task Status
python-sdist GitHub Actions
wheel-macos-monterey-cp310-amd64 GitHub Actions
wheel-macos-monterey-cp310-arm64 GitHub Actions
wheel-macos-monterey-cp311-amd64 GitHub Actions
wheel-macos-monterey-cp311-arm64 GitHub Actions
wheel-macos-monterey-cp312-amd64 GitHub Actions
wheel-macos-monterey-cp312-arm64 GitHub Actions
wheel-macos-monterey-cp313-amd64 GitHub Actions
wheel-macos-monterey-cp313-arm64 GitHub Actions
wheel-macos-monterey-cp39-amd64 GitHub Actions
wheel-macos-monterey-cp39-arm64 GitHub Actions
wheel-manylinux-2-28-cp310-amd64 GitHub Actions
wheel-manylinux-2-28-cp310-arm64 GitHub Actions
wheel-manylinux-2-28-cp311-amd64 GitHub Actions
wheel-manylinux-2-28-cp311-arm64 GitHub Actions
wheel-manylinux-2-28-cp312-amd64 GitHub Actions
wheel-manylinux-2-28-cp312-arm64 GitHub Actions
wheel-manylinux-2-28-cp313-amd64 GitHub Actions
wheel-manylinux-2-28-cp313-arm64 GitHub Actions
wheel-manylinux-2-28-cp39-amd64 GitHub Actions
wheel-manylinux-2-28-cp39-arm64 GitHub Actions
wheel-manylinux-2014-cp310-amd64 GitHub Actions
wheel-manylinux-2014-cp310-arm64 GitHub Actions
wheel-manylinux-2014-cp311-amd64 GitHub Actions
wheel-manylinux-2014-cp311-arm64 GitHub Actions
wheel-manylinux-2014-cp312-amd64 GitHub Actions
wheel-manylinux-2014-cp312-arm64 GitHub Actions
wheel-manylinux-2014-cp313-amd64 GitHub Actions
wheel-manylinux-2014-cp313-arm64 GitHub Actions
wheel-manylinux-2014-cp39-amd64 GitHub Actions
wheel-manylinux-2014-cp39-arm64 GitHub Actions
wheel-windows-cp310-amd64 GitHub Actions
wheel-windows-cp311-amd64 GitHub Actions
wheel-windows-cp312-amd64 GitHub Actions
wheel-windows-cp313-amd64 GitHub Actions
wheel-windows-cp39-amd64 GitHub Actions

@raulcd
Copy link
Member Author

raulcd commented Sep 9, 2024

@github-actions crossbow submit test-cuda-*

Copy link

github-actions bot commented Sep 9, 2024

Revision: f1d50d8

Submitted crossbow builds: ursacomputing/crossbow @ actions-ddf92023c8

Task Status
test-cuda-cpp GitHub Actions
test-cuda-python GitHub Actions

@raulcd
Copy link
Member Author

raulcd commented Sep 9, 2024

@github-actions crossbow submit python-sdist

Copy link

github-actions bot commented Sep 9, 2024

Revision: af0c193

Submitted crossbow builds: ursacomputing/crossbow @ actions-fe84520036

Task Status
python-sdist GitHub Actions

@raulcd raulcd marked this pull request as ready for review September 9, 2024 15:41
@raulcd
Copy link
Member Author

raulcd commented Sep 16, 2024

@github-actions crossbow submit -g python

Copy link

Revision: deb83bf

Submitted crossbow builds: ursacomputing/crossbow @ actions-b2844258b5

Task Status
example-python-minimal-build-fedora-conda GitHub Actions
example-python-minimal-build-ubuntu-venv GitHub Actions
test-conda-python-3.10 GitHub Actions
test-conda-python-3.10-cython2 GitHub Actions
test-conda-python-3.10-hdfs-2.9.2 GitHub Actions
test-conda-python-3.10-hdfs-3.2.1 GitHub Actions
test-conda-python-3.10-pandas-latest-numpy-latest GitHub Actions
test-conda-python-3.10-substrait GitHub Actions
test-conda-python-3.11 GitHub Actions
test-conda-python-3.11-dask-latest GitHub Actions
test-conda-python-3.11-dask-upstream_devel GitHub Actions
test-conda-python-3.11-hypothesis GitHub Actions
test-conda-python-3.11-pandas-latest-numpy-1.26 GitHub Actions
test-conda-python-3.11-pandas-latest-numpy-latest GitHub Actions
test-conda-python-3.11-pandas-nightly-numpy-nightly GitHub Actions
test-conda-python-3.11-pandas-upstream_devel-numpy-nightly GitHub Actions
test-conda-python-3.11-spark-master GitHub Actions
test-conda-python-3.12 GitHub Actions
test-conda-python-3.12-cpython-debug GitHub Actions
test-conda-python-3.9 GitHub Actions
test-conda-python-3.9-pandas-1.1-numpy-1.19.5 GitHub Actions
test-conda-python-emscripten GitHub Actions
test-cuda-python GitHub Actions
test-debian-12-python-3-amd64 GitHub Actions
test-debian-12-python-3-i386 GitHub Actions
test-fedora-39-python-3 GitHub Actions
test-ubuntu-20.04-python-3 GitHub Actions
test-ubuntu-22.04-python-3 GitHub Actions
test-ubuntu-22.04-python-313-freethreading GitHub Actions

@raulcd
Copy link
Member Author

raulcd commented Sep 16, 2024

@github-actions crossbow submit -g cuda

@raulcd
Copy link
Member Author

raulcd commented Sep 16, 2024

@github-actions crossbow submit test-ubuntu-*-python-3

@raulcd
Copy link
Member Author

raulcd commented Sep 16, 2024

@github-actions crossbow submit test-conda-python-3.9-pandas-*

Copy link

Revision: 336b9bb

Submitted crossbow builds: ursacomputing/crossbow @ actions-bb81803d22

Task Status
test-cuda-cpp GitHub Actions
test-cuda-python GitHub Actions

Copy link

Revision: 336b9bb

Submitted crossbow builds: ursacomputing/crossbow @ actions-579ae18356

Task Status
test-ubuntu-22.04-python-3 GitHub Actions
test-ubuntu-24.04-python-3 GitHub Actions

Copy link

Revision: 336b9bb

Submitted crossbow builds: ursacomputing/crossbow @ actions-074cb676c3

Task Status
test-conda-python-3.9-pandas-1.1.3-numpy-1.19.5 GitHub Actions

@raulcd
Copy link
Member Author

raulcd commented Sep 16, 2024

@github-actions crossbow submit -g cuda

Copy link

Revision: 4f1cd9c

Submitted crossbow builds: ursacomputing/crossbow @ actions-9c860297b0

Task Status
test-cuda-cpp-ubuntu-20.04-cuda-11.2.2 GitHub Actions
test-cuda-cpp-ubuntu-22.04-cuda-11.7.1 GitHub Actions
test-cuda-python-ubuntu-22.04-cuda-11.7.1 GitHub Actions

@raulcd
Copy link
Member Author

raulcd commented Sep 16, 2024

@github-actions crossbow submit -g wheel

Copy link

Revision: 4f1cd9c

Submitted crossbow builds: ursacomputing/crossbow @ actions-5f28e2f3a2

Task Status
python-sdist GitHub Actions
wheel-macos-monterey-cp310-amd64 GitHub Actions
wheel-macos-monterey-cp310-arm64 GitHub Actions
wheel-macos-monterey-cp311-amd64 GitHub Actions
wheel-macos-monterey-cp311-arm64 GitHub Actions
wheel-macos-monterey-cp312-amd64 GitHub Actions
wheel-macos-monterey-cp312-arm64 GitHub Actions
wheel-macos-monterey-cp313-amd64 GitHub Actions
wheel-macos-monterey-cp313-arm64 GitHub Actions
wheel-macos-monterey-cp39-amd64 GitHub Actions
wheel-macos-monterey-cp39-arm64 GitHub Actions
wheel-manylinux-2-28-cp310-amd64 GitHub Actions
wheel-manylinux-2-28-cp310-arm64 GitHub Actions
wheel-manylinux-2-28-cp311-amd64 GitHub Actions
wheel-manylinux-2-28-cp311-arm64 GitHub Actions
wheel-manylinux-2-28-cp312-amd64 GitHub Actions
wheel-manylinux-2-28-cp312-arm64 GitHub Actions
wheel-manylinux-2-28-cp313-amd64 GitHub Actions
wheel-manylinux-2-28-cp313-arm64 GitHub Actions
wheel-manylinux-2-28-cp39-amd64 GitHub Actions
wheel-manylinux-2-28-cp39-arm64 GitHub Actions
wheel-manylinux-2014-cp310-amd64 GitHub Actions
wheel-manylinux-2014-cp310-arm64 GitHub Actions
wheel-manylinux-2014-cp311-amd64 GitHub Actions
wheel-manylinux-2014-cp311-arm64 GitHub Actions
wheel-manylinux-2014-cp312-amd64 GitHub Actions
wheel-manylinux-2014-cp312-arm64 GitHub Actions
wheel-manylinux-2014-cp313-amd64 GitHub Actions
wheel-manylinux-2014-cp313-arm64 GitHub Actions
wheel-manylinux-2014-cp39-amd64 GitHub Actions
wheel-manylinux-2014-cp39-arm64 GitHub Actions
wheel-windows-cp310-amd64 GitHub Actions
wheel-windows-cp311-amd64 GitHub Actions
wheel-windows-cp312-amd64 GitHub Actions
wheel-windows-cp313-amd64 GitHub Actions
wheel-windows-cp39-amd64 GitHub Actions

Copy link
Member

@pitrou pitrou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, thank you @raulcd . @jorisvandenbossche can you validate the Pandas / Numpy changes?

Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@jorisvandenbossche
Copy link
Member

I opened the follow-up issue to properly bump the numpy and pandas versions: #44131

@jorisvandenbossche
Copy link
Member

The wheel-windows-cp313-amd64 failure is temporary because of a missing nightly wheel from the pandas side, which should be fixed by tomorrow. But so ignoring that for now, and merging this.

@jorisvandenbossche jorisvandenbossche merged commit aa6ab95 into apache:main Sep 16, 2024
65 of 66 checks passed
@jorisvandenbossche jorisvandenbossche removed the awaiting merge Awaiting merge label Sep 16, 2024
Copy link

After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit aa6ab95.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 13 possible false positives for unstable benchmarks that are known to sometimes produce them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants